package com.mes.cloud.dao;

import com.mes.cloud.api.dto.request.productpricegroup.ProductPriceGroupCustomerGroupListRequest;
import com.mes.cloud.entity.ProductPriceGroupCustomerGroup;
import com.mes.cloud.entity.vo.productpricegroup.ProductPriceGroupCustomerGroupCustomerGroupVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;

import java.util.List;
import java.util.Set;

/**
 * 产品价格组-产品客户组关联
 *
 * @author wxm
 * @email xiaomin.wu1@pactera.com
 * @version 2019-09-24 16:08:41
 */
public interface ProductPriceGroupCustomerGroupDao  extends SelectByIdsMapper<ProductPriceGroupCustomerGroup>, Mapper<ProductPriceGroupCustomerGroup>{

    /**
     * 批量插入产品价格组客户组关联信息
     * @param productPriceGroupCustomerGroupList
     * @return
     */
    int batchInsert(List<ProductPriceGroupCustomerGroup> productPriceGroupCustomerGroupList);

    /**
     * 批量删除
     * @param ids
     * @param updateDateStr
     * @param
     * @return
     */
    int batchDelete(@Param("list") List<String> ids,
                    @Param("updateDateStr") String updateDateStr,
                    @Param("employeeNo") String employeeNo,
                    @Param("employeeName") String employeeName);

    /**
     * 获取价格组下面的客户组
     * @param productPriceGroupCustomerGroupListRequest
     * @return
     */
    List<ProductPriceGroupCustomerGroupCustomerGroupVo> list(ProductPriceGroupCustomerGroupListRequest productPriceGroupCustomerGroupListRequest);

    /**
     * 通过产品客户组获取关联表
     * @param list
     * @return
     */
    List<ProductPriceGroupCustomerGroup> selectByProductCustomerGroupIds(@Param("list") Set<String> list);

    /**
     * 通过产品客户组获取关联表
     * @return
     */
    ProductPriceGroupCustomerGroup findDetailsByPrictGroupId(@Param("priceId") String priceId, @Param("customerId") String customerId);

}
